home *** CD-ROM | disk | FTP | other *** search
- on enterFrame
- REPORT2("enterFrame(frame " & the frame & "):OK, the ROXY movie has loaded... (at " & the timer & " ticks)")
- if the machineType <> 256 then
- closeResFile()
- openResFile(the pathName & "ROXY cursors")
- end if
- end
-
- on exitFrame
- global oStoryteller, oPuppeteer, builderWindow, domainIsReady, building, fastLocationData, gVoid, gLocData, colorcrsr
- if not objectp(oPuppeteer) then
- alert("Hey! There's no Puppeteer object")
- end if
- enterNewDomain(oPuppeteer, [field "LocationStubList"], "multiFrames", "foreground.DATA", "inventory.DATA")
- set loadTime to the timer
- REPORT2(" enterNewDomain(oPuppeteer) done at " & loadTime & " ticks")
- set myMem to the freeBytes
- if fastLocationData then
- REPORT2("loading data from external data-files...")
- set gLocData to [:]
- repeat with i = 1 to count(the LocationSublists of oPuppeteer)
- set roomName to getAt(the LocationSublists of oPuppeteer, i)
- set roomFile to FileIO(mnew, "read", the pathName & "ROXY_" & i & ".DAT")
- if objectp(roomFile) then
- set timeStamp to roomFile(mReadLine)
- if char 1 to 30 of timeStamp <> line 2 of field "LocationStublist.OLD" then
- alert("I wouldn't use this data if I were you... the time/date stamp doesn't match the current location stub-list in this domain...")
- roomFile(mdispose)
- set gLocData to gVoid
- exit repeat
- else
- set roomString to roomFile(mReadFile)
- addProp(gLocData, roomName, roomString)
- roomFile(mdispose)
- end if
- next repeat
- end if
- alert("Hm, there's some problem opening this file ('ROXY_" & i & ".DAT')..")
- put FileIO(mError, roomFile)
- set gLocData to gVoid
- exit repeat
- end repeat
- set timeElapsed to the timer
- REPORT2(">•> Finished loading loc-data at " & timeElapsed & " ticks..")
- if voidp(gLocData) then
- put "gLocData is now <void>..."
- end if
- if listp(gLocData) then
- repeat with subString in gLocData
- end repeat
- end if
- else
- put "loading it from domain movie's cast..."
- preLoadCast(30, 820)
- end if
- set loadTime to the timer
- REPORT2(" preloading all location-data took about " & loadTime & " ticks")
- REPORT2(" it also consumed " & myMem - the freeBytes & " bytes of RAM (" & (myMem - the freeBytes) / 1024 & " K)")
- put "••••••••••••••••••••••••••"
- if not objectp(colorcrsr) and (colorcrsr <> #comingBack) then
- put "•••• Loading cast-cursors… ••••"
- preLoadCast(2501, 2738)
- put "••••••• Cursors loaded •••••••"
- end if
- if not objectp(oStoryteller) then
- alert("Hey! There's no Storyteller object")
- end if
- enablePeekAlert()
- setProp(the lsStateData of oStoryteller, #currentDomain, ["ROXY"])
- set the basePalette of oPuppeteer to the number of cast "ROXY base"
- REPORT2("Domain is ready = TRUE, at " & the timer & " ticks")
- end
-